<template>
  <div class="middle flex cart_bottom">
    <div class="icon">
      <yd-icon name="phone2" size = '.4rem'></yd-icon>
      <div class="text-center">电话</div>
    </div>
    <div class="icon">
      <yd-icon name="shopcart" size = '.4rem'></yd-icon>
      <div class="text-center">购物车</div>
    </div>
    <div class="text-right f1">
      <div class="inline-block btn" @click = 'add'>加入购物车</div>
      <div class="inline-block btn" @click = "buy">立即购买</div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'cart-bottom',
  methods: {
    buy () {
      this.$emit('buy')
    },
    add () {
      this.$emit('add')
    }
  }
}
</script>
<style lang="scss" scoped>
  .cart_bottom{
    background-color: #fff;
    padding: $padding;
    box-sizing: border-box;
    .icon{
      margin-right: .3rem;
    }
    .btn{
      background-color: rgb(255, 153, 0);
      color: #fff;
      padding: .2rem .4rem;
      &:first-of-type{
        border-top-left-radius: 4rem;
        border-bottom-left-radius: 4rem;
      }
      &:last-of-type{
        border-top-right-radius: 4rem;
        border-bottom-right-radius: 4rem;
      }
    }
  }
</style>
